package com.windy.search.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "windy_product",shards = 1,replicas = 0)
public class ESProduct {

    @Id
    private Long id;

    @Field(type = FieldType.Text,analyzer = "lk_max_word",store = true)
    private String name;

    @Field(type = FieldType.Text,analyzer = "lk_max_word",store = true)
    private String pic;

    @Field(type = FieldType.Integer)
    private Integer store;

    @Field(type = FieldType.Text,analyzer = "lk_max_word",store = true)
    private String state;
}
